import request from "@/utils/request";

// 查询测试文件列表
export function listFile(query) {
  return request({
    url: "/dmsIms/file/list",
    method: "get",
    params: query,
  });
}

// 查询测试文件详细
export function getFile(id) {
  return request({
    url: "/dmsIms/file/" + id,
    method: "get",
  });
}

// 新增测试文件
export function addFile(data) {
  return request({
    url: "/dmsIms/file",
    method: "post",
    data: data,
  });
}

// 修改测试文件
export function updateFile(data) {
  return request({
    url: "/dmsIms/file",
    method: "put",
    data: data,
  });
}

// 删除测试文件
export function delFile(id) {
  return request({
    url: "/dmsIms/file/" + id,
    method: "delete",
  });
}

// 上传文件
export function fileUploadFiles(data) {
  return request({
    url: "/dmsIms/file/uploadFiles",
    method: "post",
    data,
  });
}

export function fileUploadFile(data) {
  return request({
    url: "/dmsIms/file/uploadFile",
    method: "post",
    data,
  });
}

export function checkFileExist(id) {
  return request({
    url: "/dmsIms/file/fileCheck/" + id,
    method: "get",
  });
}
